package com.zhuyuan.system.api.feign;

import com.zhuyuan.core.util.Result;
import com.zhuyuan.system.api.constants.FeignConfig;
import com.zhuyuan.system.api.constants.ServiceNameConstants;
import com.zhuyuan.system.api.domain.SysUser;
import com.zhuyuan.system.api.domain.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: 张琳凯
 * @Description: TODO
 * @DateTime: 2025/2/26 11:16
 **/
@FeignClient(contextId = "SysUserApi",value = ServiceNameConstants.SYSTEM_SERVICE,configuration = FeignConfig.class)
public interface ISysUserApi {


    /**
     * 根据用户名或者手机号查询用户信息
     *
     * @param username 账户名
     * @return Result
     */
    @GetMapping("/user/info")
    Result<UserInfo> infoByUserNameOrPhone(@RequestParam("username") String username,@RequestParam("phone") String phone);
}
